﻿using UnityEngine;

public interface iMediaFile
{
	string Name { get; set; }
	string FilePath { get; set; }
}

public class MediaFile : iMediaFile
{
	public string Name { get; set; }
	public string FilePath { get; set; }

	public MediaFile(string name, string path)
	{
		Name = name;
		FilePath = path;
	}
}

public interface iPlayer
{
	void Play(iMediaFile file);
}

public class Player : iPlayer
{
	public void Play(iMediaFile file)
	{
		Debug.Log("播放文件" + file.Name);
	}
}

public class PlayMediaDemo : MonoBehaviour
{
	void Start()
	{
		iPlayer player = new Player();
		iMediaFile file = new MediaFile("千里香", "C:\\Media");
		player.Play(file);
	}
}